package booroo.basic;

import java.util.Scanner;



public class Pract_P236_Ex5 {

	public static void main(String[] args) {
		Add A = new Add();
		Sub S = new Sub();
		Mul M = new Mul();
		Div D = new Div();
		Scanner sc = new Scanner(System.in);
		int num1;
		int num2;
		String c;
		System.out.println("두 정수와 연산자를 입력하시오>>");
		
		num1 = sc.nextInt();
		num2 = sc.nextInt();
		c = sc.next();
						
		if((c.equals("+"))){
			A.setValue(num1,num2);
			System.out.println(A.calculate());
		}
		else if((c.equals("-"))){
			S.setValue(num1,num2);
			System.out.println(S.calculate());
		}
		else if((c.equals("*"))){
			M.setValue(num1,num2);
			System.out.println(M.calculate());
		}
		else if((c.equals("/"))){
			D.setValue(num1,num2);
			System.out.println(D.calculate());
		}
			
		sc.close();
		} // main

	} // catch
	
	
	
class Add{
	int a, b;
	void setValue(int a, int b){
		this.a = a;
		this.b = b;
	}
	int calculate(){
		return a + b;
	}
}
class Sub{
	int a, b;
	void setValue(int a, int b){
		this.a = a;
		this.b = b;
	}
	int calculate(){
		return a - b;
	}
}
class Mul{
	int a, b;
	void setValue(int a, int b){
		this.a = a;
		this.b = b;
	}
	int calculate(){
		return a * b;
	}
}
class Div{
	int a, b;
	void setValue(int a, int b){
		this.a = a;
		this.b = b;
	}
	int calculate(){
		return a / b;
	}
}